package jia.core.state;

import jia.core.characters.GameCharacter;

import java.awt.*;
import java.util.ArrayList;

public class CombatState {

	protected boolean playerHasControl;
	protected boolean flatFooted;
	protected boolean blind;
	protected boolean held;
	protected boolean panicked;
	protected int initiative;
	protected boolean enemy;
	protected GameCharacter character;
	protected long opponentId = 0;
	protected Point XY = new Point(0,0);
	protected ArrayList surroundingSquares = new ArrayList();
	protected Image sprite;
	protected Image attackSprite;


	public CombatState(GameCharacter gameCharacter) {
		this.character = gameCharacter;
	}

	public CombatState(boolean playerHasControl, int initiativeScore, GameCharacter gameCharacter) {
		this.playerHasControl = playerHasControl;
		this.initiative = (initiativeScore + gameCharacter.getDexterityMod());
		this.character = gameCharacter;
	}

	public CombatState(boolean playerHasControl, int initiativeScore, GameCharacter gameCharacter, boolean enemy) {
		this.playerHasControl = playerHasControl;
		this.initiative = (initiativeScore + gameCharacter.getDexterityMod());
		this.character = gameCharacter;
		this.enemy = enemy;
	}

	public CombatState(boolean playerHasControl, int initiativeScore, GameCharacter gameCharacter, boolean enemy, int opponentId) {
		this.playerHasControl = playerHasControl;
		this.initiative = (initiativeScore + gameCharacter.getDexterityMod());
		this.character = gameCharacter;
		this.enemy = enemy;
		this.opponentId = opponentId;
	}

	public ArrayList getSurroundingSquares() {
		return surroundingSquares;
	}

	public void setSurroundingSquares(ArrayList surroundingSquares) {
		this.surroundingSquares = surroundingSquares;
	}

	public Image getSprite() {
		return sprite;
	}

	public void setSprite(Image sprite) {
		this.sprite = sprite;
	}

	public Image getAttackSprite() {
		return attackSprite;
	}

	public void setAttackSprite(Image attackSprite) {
		this.attackSprite = attackSprite;
	}

	public Point getXY() {
		return XY;
	}

	public void setXY(Point XY) {
		this.XY = XY;
	}

	public double getX(){
		return this.XY.getX();
	}

	public double getY(){
		return this.XY.getY();
	}

	public boolean isEnemy() {
		return enemy;
	}

	public void setEnemy(boolean enemy) {
		this.enemy = enemy;
	}

	public boolean isPlayerHasControl() {
		return playerHasControl;
	}

	public void setPlayerHasControl(boolean playerHasControl) {
		this.playerHasControl = playerHasControl;
	}

	public boolean isFlatFooted() {
		return flatFooted;
	}

	public void setFlatFooted(boolean flatFooted) {
		this.flatFooted = flatFooted;
	}

	public boolean isBlind() {
		return blind;
	}

	public void setBlind(boolean blind) {
		this.blind = blind;
	}

	public boolean isHeld() {
		return held;
	}

	public void setHeld(boolean held) {
		this.held = held;
	}

	public boolean isPanicked() {
		return panicked;
	}

	public void setPanicked(boolean panicked) {
		this.panicked = panicked;
	}

	public int getInitiative() {
		return initiative;
	}

	public void setInitiative(int initiative) {
		this.initiative = initiative;
	}

	public GameCharacter getCharacter() {
		return character;
	}

	public void setCharacter(GameCharacter character) {
		this.character = character;
	}

	public long getOpponentId() {
		return opponentId;
	}

	public void setOpponentId(long opponentId) {
		this.opponentId = opponentId;
	}
}
